FROM php:7.2.34-fpm
RUN docker-php-source extract \
    && curl -L -o redis4.3.0.tgz https://pecl.php.net/get/redis-4.3.0.tgz && tar xvf redis4.3.0.tgz && mv redis-4.3.0 /usr/src/php/ext/redis && rm -f redis4.3.0.tgz \
    && sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list && rm -rf /var/lib/apt/lists/* &&  cat /etc/apt/sources.list \
    && apt-get update && apt-get install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev \
    && docker-php-ext-configure gd --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2 \
    && docker-php-ext-install redis gd pdo mysqli\
    &&docker-php-source delete